home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / bat.zip / EBL.TIP < prev    next >
Text File  |  1986-06-22  |  4KB  |  118 lines

  1. Some interesting and useful routines from Larry Weiss for the SEAWARE
  2. Extended Batch Language that's in the XA1 database. If you have some
  3. routines you'd like to share put them up in a message and I'll add them
  4. to the file. If you've not tried EBL yet use the BRO command with a
  5. keyword of EBL to see all the EBL files.
  6.  
  7.                                 Don Watkins [76703,750]
  8.  
  9. Fm: Larry Weiss     74415,735
  10. To: all
  11.  
  12. Has anyone noticed how well Seaware's EBL (Extended Batch Language) and
  13. DOSEDIT complement one another?  Turns out that the input to a EBL READ
  14. statement can be generated by DOSEDIT by the up/down arrows. Try this trivial
  15. example as the contents of TEST.BAT:
  16. bat * test.bat
  17. bat -top
  18. bat    read .......source file name: %1
  19. bat    read ..destination file name: %2
  20. copy %1 %2
  21. bat goto -top
  22. bat exit
  23.   The names of the prior input to the reads can be retrieved thanks to NEWKEY.
  24. (Oh, to stop this eternal loop use the Break key). Since EBL is User Supported
  25. (and they certainly ask a reasonable amount of contribution, $30), I would
  26. guess that many of us have "BATware" utilities lying around by now.  It would
  27. be interesting to share these (I'm just learning the language, but I'll
  28. certainly publish anything useful here that I come up with, especially
  29. anything that would help novices, and friendly EBL front-ends to some of the
  30. DOS commands would seem appropriate!)....LW
  31.  
  32. PS: User Supported basically means that the software is distributed a lot like
  33. public domain stuff (free), and the documentation has a section imbedded in it
  34. that requests the user to make a contribution to the author of whatever the
  35. program is worth (to the user).  A suggested amount is usually specified.
  36. Sometimes further stipulations are present, for example Seaware requires the
  37. $30 from all commercial users of their EBL but leaves the contribution
  38. optional to private users.  Sometimes there are incentives to the
  39. contributors, as in the case with EBL, Seaware will send extended
  40. documentation and grant access to a Bulletin Board system that supports their
  41. products.
  42.  
  43. Fm: Larry Weiss     74415,735
  44. To: all
  45.  
  46. Here's an interesting "Batware" routine that facilitates use of the DOS RENAME
  47. function, when running with ANSI.SYS, and especially when running with
  48. DOSEDIT:
  49.  
  50. bat * rename a file
  51. bat begtype
  52. ..old name:
  53. ..new name: ;
  54. end
  55. bat call -curup | call -cursave
  56. bat call -go1
  57. bat if (%1) <> () type %1;
  58. bat if (%1) = () read %1
  59. bat if (%1) = () goto -quit
  60. bat call -go2
  61. bat if (%2) <> () type %2;
  62. bat if (%2) = () read %2
  63. bat if (%2) = () goto -quit
  64. rename %1 %2
  65. bat exit
  66.  
  67. bat -go1 | call -currest | return
  68.  
  69. bat -go2 | call -currest
  70. bat        call -curdown | return
  71.  
  72. bat -quit | call -go2 | exit
  73.  
  74. bat -curhome | begtype
  75. \1B[H;
  76. end
  77. bat return
  78.  
  79. bat -curup | begtype
  80. \1B[1A;
  81. end
  82. bat return
  83.  
  84. bat -curdown | begtype
  85. \1B[1B;
  86. end
  87. bat return
  88.  
  89. bat -clears | begtype
  90. \1B[2J;
  91. end
  92. bat return
  93.  
  94. bat -cursave | begtype
  95. \1B[s;
  96. end
  97. bat return
  98.  
  99. bat -currest | begtype
  100. \1B[u;
  101. end
  102. bat return
  103.  
  104. You are forewarned about what information is required and don't have to
  105. remember positions of parameters. If running with DOSEDIT you can rename a
  106. long filename without retyping the unchanged parts of the name twice. The only
  107. drawback as is, is that you have to give this file a name other than
  108. RENAME.BAT, say, something like RN.BAT. I'm working on a "SHELL" Batware
  109. routine that will eliminate this bit of awkwardness and hope to have it done
  110. in a couple of weeks. Notice too that you can enter one or both of the
  111. parameters positionally on the line that invokes the BAT routine. I'd like to
  112. hear about suggestions along these lines as to what should be included in that
  113. utility....LW
  114.  
  115.  
  116.  
  117. Press ENTER to continue:
  118.